package com.uam.core.lk.utils.constant;

import java.nio.charset.Charset;

/**
 * @Description  所有项目可能用到的  公共常量
 * @Version 1.0
 * @Author 祝展
 * @Date 2019/10/23 15:33
 **/
public class Constants {
    //token
    public static final String TOKEN = "token";
    //登录绑定参数
    public static final String LOGIN_BINDING = "loginBinding";
    //渠道(发包)
    public static final String CHANNEL = "channel";
    //访问渠道对应channelInfoId
    public static final String ACCESS_CHANNEL = "accessChannel";
    //设备操作系统类型:Android,IOS,Html5
    public static final String PLATFORM_NO = "platformNo";
    //版本号
    public static final String VERSION = "version";
    //机型
    public static final String DEVICEMODEL = "deviceModel";
    //设备类型:android,iphone,ipad,html
    public static final String DEVICETYPE = "deviceType";
    //手机SIM卡串码
    public static final String IMSI = "imsi";
    //设备唯一系列号
    public static final String IMEI = "imei";
    //经度
    public static final String LONGITUDE = "longitude";
    //纬度
    public static final String LATITUDE = "latitude";
    //appClient
    public static final String APP_CLIENT = "appClient";
    //unknown
    public static final String UNKNOWN = "unknown";
    //请求头
    public static final String X_FORWARDED_FOR = "x-forwarded-for";
    //请求头
    public static final String PROXY_CLIENT_IP = "Proxy-Client-IP";
    //请求头
    public static final String WL_PROXY_CLIENT_IP = "WL-Proxy-Client-IP";
    //请求头
    public static final String HTTP_CLIENT_IP = "HTTP_CLIENT_IP";
    //请求头
    public static final String HTTP_X_FORWARDED_FOR = "HTTP_X_FORWARDED_FOR";

    //设备品牌
    public static final String DEVICEBRAND = "deviceBrand";

    //Android app version
    public static final String APP_VERSION_CODE ="appVersionCode";

    // Add by wcy 2019-10-30，整合过来的常量
    public static final String ENCODING = "UTF-8";
    public static final String SIGN_RSA = "RSA"; // RSA 签名算法

    /**
     * Charset 类型编码格式
     */
    public static final Charset CHARSET_ENCODING = Charset.forName(ENCODING);

    public static final String CUT_SYMBOL = "#";

    /**
     * <p>
     * 时间戳的截断位所用除数
     * </p>
     * <p>
     * 用于 jwt中时间戳(例如iat,exp) 和 系统内System.currentTimeMillis()时间戳的值的比对<br>
     * 前者精确到秒级别,后者精确到毫秒级,相差3位<br>
     * </p>
     */
    public static final Long JWT_TIMESTAMP_CUT = 1000L;
}
